import { createApp } from 'vue'
import App from './App.vue'
import AntD from 'ant-design-vue'
import { createStore } from 'vuex'
import router from './router'
import './input.css'
import 'ant-design-vue/dist/reset.css';

const store = createStore({
  state: {
    doctorInfo:{
      doctorAccount: '',
      doctorName: '',
      doctorPasswd: '',
      doctorId:''
    },
    HospitalInfo:{
      hospitalId: '',
      hospitalName: '',
    }

  },
  mutations: {
    setDoctorInfo(state, doctorInfo) {
      state.doctorInfo.doctorAccount = doctorInfo.doctorAccount
      state.doctorInfo.doctorName = doctorInfo.doctorName
      state.doctorInfo.doctorPasswd = doctorInfo.doctorPasswd
      state.doctorInfo.doctorId = doctorInfo.doctorId
    },
    setHospitalInfo(state, HospitalInfo) {
      state.HospitalInfo.hospitalId = HospitalInfo.id
      state.HospitalInfo.hospitalName = HospitalInfo.name
    }
  }
})

const app = createApp(App)

app.use(router)
app.use(store)
app.use(AntD)
app.mount('#app')
